<template>
	<div class="box">
		<router-view></router-view>
		<v-navbar :items="items" :showIconOrSrc="showIconOrSrc" :idx="idx" @change="change"></v-navbar>
	</div>
</template>

<script>
import NavBar from "@/navbar/navbar"
export default {
	name: 'navbar',
	data() {
		return {
			idx:0,
			showIconOrSrc: false,
			items: [{
						cls:"home",
						name:"首页",
						push:"/home",
						icon: 'iconfont icon-shouye',
						iconSelect: 'iconfont icon-shouye',
						src:"http://118.190.209.124/img/home_normal.png",
						srcSelect:"http://118.190.209.124/img/home_selected.png"
					},
					{
						cls:"shares",
						name:"归档",
						push:"/shares",
						icon: "iconfont icon-guidang",
						iconSelect: 'iconfont icon-guidang',
						src:"http://118.190.209.124/img/guidang_normal.png",
						srcSelect:"http://118.190.209.124/img/guidang_selected.png"
					},
					{
						cla:"community",
						name:"博主",
						push:"/community",
						icon: "iconfont icon-bozhuguanli",
						iconSelect: 'iconfont icon-bozhuguanli',
						src:"http://118.190.209.124/img/user_normal.png",
						srcSelect:"http://118.190.209.124/img/user_selected.png"
					},
					{
						cla:"mine",
						name:"链接",
						push:"/mine",
						icon: "iconfont icon-lianjie2",
						iconSelect: 'iconfont icon-lianjie2',
						src:"http://118.190.209.124/img/lianjie_normal.png",
						srcSelect:"http://118.190.209.124/img/lianjie_selected.png"
					}],
		
		}
	},
	components: {
		"v-navbar": NavBar,
	},
	methods: {
		change(index){
			this.idx = index
		}
	}
}
</script>

<style scoped>
.box{
	width: 100%;
	height: 100%;
}
</style>